{layout name="admin:layout" /}
<div class="tipbox tipbox-message">
    <span class="fn-fb">友情提示:</span>
    <p class="gray">
    1、请打开微信开放平台置查看接口信息,网址:<a href="https://open.weixin.qq.com" target="_blank">https://open.weixin.qq.com</a><br /> 
    2、微信开放平台->网站应用->创建网站应用 审核通过后获取开发者ID(AppID)和开发者密码(AppSecret)<br /> 
    3、授权回调域名填写 (域名：<span class="red">{$Request.host}/system</span>)
    </p>
</div>
<form id="form" action="{url('sysyte/admin.setting/wechatOpenLogin')}">
    <table class="formtable">
        <tr><th>授权回调域:</th><td>{$Request.host}/system</td></tr>
        <tr>
            <th>AppID:</th>
            <td><input class="input" datatype="*" type="text" name="app_id" value="{$info.app_id}" /></td>
        </tr>
        <tr>
            <th>AppSecret:</th>
            <td><input class="input w400" datatype="*" type="text" name="secret" value="{$info.secret}" /></td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" value="确定" class="button submit" />
                <input type="reset" value="重置" class="button button-blank" />
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">
    Do('base', 'layer', 'form', function () {
        $('#form').isForm();
        $('.token').click(function(){
            var key = randomWord(32,32,32)
            $('#token').val(key)
        })
        $('.aes_key').click(function(){
            var key = randomWord(43,43,43)
            $('#aes_key').val(key)
        })
    })
    </script>